module Rack
  module AllowFrom
    class Railtie < Rails::Railtie
      config.allow_from = %w(127.0.0.1 localhost *.dev)
      initializer "rack-allow-from.configure_rails_initialization" do |app|
        app.middleware.insert_before 0, "Rack::AllowFrom::Middleware"
      end
    end
  end
end
